This widget creates a 3D view that displays a 3D Scene where 3D Objects can be aggregated and represented. The viewpoint for the 3D scene is set by a translation vector (tx,ty,tz) followed by a rotation defined by Euler angles (rx,ry,rz) which coordinates can be initialized and controlled by exposed parameters.
See common widgets attributes.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
x_ratio |
1 |
aspect ratio for the x axis. |
|
1.6 |
1.6 |
|
y_ratio |
1 |
aspect ratio for the y axis. |
|
1.6 |
1.6 |
|
z_ratio |
1 |
aspect ratio for the z axis. |
|
1.6 |
1.6 |
|
transform.tx |
1 |
tx coordinate for the translation matrix of the view point. |
|
1.6 |
1.6 |
|
transform.ty |
1 |
ty coordinate for the translation matrix of the view point. |
|
1.6 |
1.6 |
|
transform.tz |
1 |
tz coordinate for the translation matrix of the view point. |
|
1.6 |
1.6 |
|
transform.rx |
1 |
rx: Euler angle (degrees) for the rotation around the x axis. |
|
1.6 |
1.6 |
|
transform.ry |
1 |
ry: Euler angle (degrees) for the rotation around the y axis. |
|
1.6 |
1.6 |
|
transform.rz |
1 |
rz: Euler angle (degrees) for the rotation around the z axis. |
|
1.6 |
1.6 |
|
persistent_viewpoint |
false |
Shortcut to make all the parameters of the viewpoint persistent (apsect ratio and transform matrix coordinates). This also enables undo/redo on all modifications of the 3D viewpoint made by the end user. |
|
1.6 |
1.6 |
Display a 3D surface defined by a formula, with default viewpoint specified:
<!-- The formula for the surface to display --> <FORMULA_SURFACE formula="cos(2*pi*x)*sin(2*pi*y)*sqrt(1-x^2-y^2)" id="my_formula" x_min="-1" x_max="1" x_default="0" y_min="-1" y_max="1" y_default="0" z_min="-1" z_max="1" z_default="0" x_offset=".5" y_offset=".5" z_offset=".5"/> <!-- The 3D Viewer --> <VIEW_3D width="600" height="400" cursor="system::open_hand" y_ratio=".8" z_ratio=".5" transform.tz="-1.3" persistent_viewpoint="true" transform.rx="60" transform.rz="20"> <!-- The 3D Surface Object --> <COLOR_SURFACE_3D high_color="#ff0000" low_color="#000001" opacity=".8" x_positions_count="100" y_positions_count="100" x_offset=".5" y_offset=".5" z_offset=".5" x_position="-.5" y_position="-.5" z_position="-.5"/> </VIEW_3D>